home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-06-11 | 43.2 KB | 1,076 lines |
- Newsgroups: comp.os.linux,comp.os.linux.announce,comp.answers,news.answers
- Path: senator-bedfellow.mit.edu!enterpoop.mit.edu!spool.mu.edu!uwm.edu!ux1.cso.uiuc.edu!howland.reston.ans.net!agate!doc.ic.ac.uk!warwick!uknet!mcsun!julienas!geocub!labri.greco-prog.fr!corsini
- From: corsini@labri.greco-prog.fr
- Subject: Linux Frequently Asked Questions 3/6 [monthly posted]
- Message-ID: <PART3_739718152@geocub.greco-prog.fr>
- Followup-To: poster
- Summary: Linux, a small and free unix-like for 386-AT computers.
- Sender: corsini@greco-prog.fr (Marc-Michel CORSINI)
- Reply-To: linux@numero6.greco-prog.fr
- Organization: Greco Prog. CNRS & LaBRI, Bordeaux France
- References: <PART2_739718152@geocub.greco-prog.fr>
- Date: Thu, 10 Jun 1993 13:16:34 GMT
- Approved: news-answers-request@MIT.Edu
- Expires: Sat, 24 Jul 1993 13:15:52 GMT
- Lines: 1058
- Xref: senator-bedfellow.mit.edu comp.os.linux:45694 comp.os.linux.announce:772 comp.answers:943 news.answers:9274
-
- Archive-name: linux-faq/part3
-
- Last-Modified: 93/06/1
- Version: 1.19
-
- *********************************************************
- * *
- * Answers to Frequently asked questions about Linux *
- * *
- *********************************************************
-
- This post contains Part 3 of the Linux FAQ (6 parts).
- It must be read *after* the 2 first parts.
-
- ===================================8<====>8============================
- CONTENTS (of this part)
-
- VI. MISCELLANEOUS HINTS (part3)
- VII. MORE HINTS (part3)
-
- ===================================8<====>8============================
-
-
-
- VI. MISCELLANEOUS HINTS
- =======================
- *** This section is maintained by Matt Welsh (mdw@tc.cornell.edu). Please
- *** mail me if you have any changes/updates/questions. Thanks -mdw
-
- Special gcc information are located in section IX. A special section is
- devoted to it since it's *the* compiler of Linux. I have subsectionned
- this part in 3 subsections:
-
-
- VI.A Misc Information
- VI.B Minor/Major Information
-
- VI.C Serial Information
-
-
- VI.A. Misc information
- ~~~~~~~~~~~~~~~~~~~~~~
-
- VI.01) It seems that $#@! ported on linux don't run correctly, what
- do I do about reporting bugs?
-
- ANSWER: (Matt Welsh) It's possible that either the program itself has a bug
- or that Linux has a problem that this program brings out. :) But first check
- that the size of the file(s) corresponds that of the files(s) on the FTP
- sites where it's available. If they're different, either you downloaded them
- incorrectly (i.e. you forgot to turn on "bin") or whoever put them on the
- FTP site uploaded them incorrectly.
-
- If that's not the problem, then post to comp.os.linux asking about the
- program, to verify that it is a bug. PLEASE: when posting possible "bug
- reports" include all error and output information from running/compiling
- the program. Just saying "it doesn't work" isn't very helpful. Also mention
- your specific setup, Linux version, GCC version, etc. Some of these things
- depend on running under certain versions and you may have missed that
- information.
-
- Note that my "ml-linux-bugs@dg-rtp.dg.com" bug reporting list has been
- phased out. It turns out that Linux has so few bugs, most of which are
- resolved on the newsgroup or through Linus before I can accumulate them
- and post. :) In short: if there's a bug in Linux or in Linux-ported
- software, it will usually be fixed in the next patchlevel or version.
-
-
- VI.02) Has $#@! been ported to Linux?
-
- ANSWER: First check out the FTP sites and read the monthly INFO-SHEET,
- as well as the new "Linux News" and the META-FAQ's (all of which are
- either available on the FTP sites and/or posted to the newsgroup as they're
- written). Also check out the "Linux Project Registry" (posted to the
- newsgroup and on the FTP sites) which lists ongoing/current Linux projects.
- Also look in the "old" Linux digests and mailing-list archives, kept on
- tsx-11.mit.edu and nic.funet.fi. Also, see if there's a GNU(*) version
- of the program you're looking for (which are available everywhere).
- Since Linux uses GCC as its native compiler, most GNU software ports
- directly to Linux without problems. If all else fails, ask on the
- mailing list or newsgroup if the program is ported and where it's
- available.
-
-
- (*) GNU stands for GNU's Not Unix, which (besides being a recursive
- acronym) is a project started by the Free Software Foundation (the FSF)
- to write a freely distributable version of Unix. The GNU kernel is
- named HURD, and is based on Mach. It is currently being written, and is
- not yet done. Many of the GNU utilities, however, are completed and are
- much more functional than the original Unix utilities. Since they are
- freely available, Linux is using them as well.
-
-
-
- VI.03) I've ported $#@! to Linux, what should i do to add it in the
- standard distribution?
-
- ANSWER: (Matt Welsh) First read the previous Q/A, then talk to the
- maintainers of the various releases (MCC interim, SLS, and so on)
- about including your program with those releases. The best way to make
- programs available to the rest of the world is to upload it to one of
- the Linux FTP sites (such as tsx-11.mit.edu:/pub/incoming or
- sunsite.unc.edu:/pub/Linux/Incoming).
-
- BTW Whenever you submit binaries, please think that if you link them
- with shared libraries, this might cause problems for those who (gasp!)
- don't have the shared libraries installed. You can either link them
- using -static, and if someone wants to build a shared version on their
- own machine they can get the sources (which you should also make
- available) and build it themself. Or else provide the shared lib.
-
-
- VI.04) I want to port $#@! to Linux, what are the flags?
-
- ANSWER: Recall that Linux implements subset of SYSV and POSIX, so
- -DUSG and -DPOSIX work in general.
-
- NOTE1: SIGBUS is not there, and can be safely commented out in general.
- NOTE2: see section related to GCC, in the third part of this FAQ, for
- more details.
-
-
- VI.B. Major/Minor device number
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *** This section is maintained by Rick Miller, any comments,
- *** suggestions, remarks should be mailed to him at <rick@ee.uwm.edu>
- *** Last Update: April 1993
-
- This is a list of the device names, along with Major and minor numbers,
- which the Linux kernel may currently recognize. I say "may" because some
- of them may require patches to your kernel, others must be configured-in
- using the Linux kernel's "make config" routine before compiling.
-
- My profuse thanks to all the writers of device drivers for Linux, and to
- all those patient folks who took the time to explain their devices to me.
- May they become obscenely rich. Until then, I hope this list will help
- prevent driver collisions and perhaps lend a clue to a newbie or two.
-
-
- IF YOU WANT ANY CHANGES OR ADDITIONS TO THIS LIST, *TELL ME*!
-
- DEVICES NOT LISTED HERE SHOULD USE MAJOR NUMBERS *ABOVE 127*
- UNTIL ALLOCATED A MORE PERMANENT NUMBER IN THE LOWER RANGE.
- (I suggest using a more-or-less random number to avoid the
- chance of collisions with any other experimental drivers.)
-
- TO HAVE MAJOR/MINOR NUMBERS ALLOCATED (OFFICIALLY) FOR
- YOUR DEVICE DRIVER, SEND E-MAIL TO: RICK@EE.UWM.EDU
-
- VI.05) What are the device minor/major numbers?
-
- Majors:
- 0. Unnamed ....... (unknown) .... for proc-fs, NFS clients, etc. (???)
- 1. Memory ........ (character) .. mem ramdisk kmem null port zero core
- 2. Floppy ........ (block) ...... fd[0-3]<[dhDH]{360,720,1200,1440}>
- 3. AT-Disk ....... (block) ...... hd[a-b]<[0-8]>
- 4. Tty ........... (character) .. tty's and pty's
- 5. Dial-out ...... (character) .. tty cua*
- 6. Parallel ...... (character) .. par[0-2] lp[0-2]
- 8. SCSI-Disk ..... (block) ...... sd[a-h]<[0-8]>
- 9. SCSI-Tape ..... (character) .. <n>st[0-1] or <n>rmt[0-1]
- 10. Mouse ......... (character) .. logibm psaux inportbm atibm (mouse)
- 11. CD-ROM ........ (block) ...... scd[0-1]
- 12. QIC-tape? ..... (character) .. rmt{8,16} tape<{-d,-reset}>
- 13. XT-disk ....... (block) ...... xd[a-b]<[0-8]>
- 14. Audio ......... (character) .. audio dsp midi mixer sequencer
- 15. Joystick ...... (character) .. js[0-1]
- 16. Socket ........ (character) .. net arp
- 17. AF_UNIX ....... (character) .. unix
- 18. AF_INET ....... (character) .. inet ip icmp tcp udp
- 19. WE-driver ..... (character) .. we[0-3]
- 20. DP8390-driver . (character) .. wd[0-3] ec[0-3] ne[0-3]
- 21. Sony-CD-ROM ... (block) ...... sonycd
- 22. 2nd AT-Cntrlr . (block) ...... hd1[a-b]<[0-8]>
- 23. Mitsumi CD-ROM (block) ...... mcd
- 31. Link Interface (character?) . ???
-
- Breakdown of minors by Majors:
- ------------------------------
- 0. Unnamed ....... (unknown) .... for proc-fs, NFS clients, etc.
- Minors?
-
- 1. Memory ........ (character) .. ram mem kmem null port zero core
- (0. /dev/ram: was supposed to be the ramdisk, but never got used.
- As of this date it has not been implemented and probably won't be.)
- 1. /dev/mem
- 1. /dev/ramdisk: a BLOCK device (the RAM-disk)
- 2. /dev/kmem
- 3. /dev/null
- 4. /dev/port
- 5. /dev/zero
- 6. /dev/core: like /dev/mem, but in "core"-file format for gdb
-
- 2. Floppy ........ (block) ...... fd[0-3]<[dhDH]{360,720,1200,1440}>
- Minors are [[4 * type] + drive] where drive 0-3 == A:-D: (floppy)
- and type is: 0: Autodetect 4: 720k on 3.5" DD
- 1: 360k on 5.25" DD 5: 360k on 5.25" HD
- 2: 1.2M on 5.25" HD 6. 720k on 5.25" HD
- 3: 360k on 3.5" DD 7. 1.44M on 3.5" HD
-
- 0. /dev/fd0: Autodetected first floppy.
- 1. /dev/fd1: Autodetected second floppy.
- 2. /dev/fd2: Autodetected third floppy.
- 3. /dev/fd3: Autodetected fourth floppy.
- 4. /dev/fd0d360: 360k on 5.25" DD in first drive
- 5. /dev/fd1d360: 360k on 5.25" DD in second drive
- (You can work out the rest of the intermediates...)
- 8. /dev/fd0h1200: 1.2M on 5.25" HD in first drive
- 12. /dev/fd0D360 (/dev/fd0H360): 360k on 3.5" DD in first drive
- 16. /dev/fd0D720 (/dev/fd0H720): 720k on 3.5" DD in first drive
- 20. /dev/fd0h360: 360k on 5.25" HD in first drive
- 24. /dev/fd0h720: 720k on 5.25" HD in first drive
- 28. /dev/fd0H1440: 1.44M on 3.5" HD in first drive
-
- Naming goes like this:
- fd[drive][media][size]
- where: [drive]=0-3: Corresponds to DOS's "A:"-"D:".
- [media]={d,h,D,H}: d=Double Density 5.25" diskette
- h=High Density 5.25" diskette
- D=Double Density 3.5" diskette
- H=High Density 3.5" diskette
- [size]={360,720,1200,1440} kilobytes.
-
- Floppies are assumed to be double-sided (DS), and
- drives are assumed to be high-density devices.
-
- 3. AT-Disk ....... (block) ...... hd[a-d]<[0-8]>
- (For IDE, MFM, and RLE drives and controllers.)
- On the first AT controller card:
- 0. /dev/hda (/dev/hda0): The whole first HD, including its MBR.
- 1-4. /dev/hda{1-4}: Primary partitions on the first hard drive.
- 5-8. /dev/hda{5-8}: Extended partitions on the first hard drive.
- 64. /dev/hdb (/dev/hdb0): The whole second HD, including its MBR.
- 65-68. /dev/hdb{1-4}: Primary partitions on the second hard drive.
- 69-72. /dev/hdb{5-8}: Extended partitions on the second hard drive.
- On the second AT controller card:
- 128. /dev/hdc (/dev/hdc0): The whole third HD, including its MBR.
- 129-132. /dev/hdc{1-4}: Primary partitions on the third hard drive.
- 133-136. /dev/hdc{5-8}: Extended partitions on the third hard drive.
- 192. /dev/hdd (/dev/hdd0): The whole fourth HD, including its MBR.
- 193-196. /dev/hdd{1-4}: Primary partitions on the fourth hard drive.
- 197-200. /dev/hdd{5-8}: Extended partitions on the fourth hard drive.
-
- Notes: BE *VERY* CAREFUL WITH the four "whole drive" devices (hda,
- hdb, hdc, and hdd)!! These four devices embody the *entire*
- *drive*, not just one partition. The only things that use
- them are things that need to read/change the partition table
- (like fdisk).
-
- Linux doesn't order anything. It perceives partitions in the
- order in which they appear in the partition table. Thus,
- /dev/hd?1 may follow /dev/hd?2 in the cylinder numbering.
-
- The names of the hard drives are not the same as under Minix.
-
- 4. Tty ........... (character) .. tty's and pty's
- 0. /dev/tty0: This is the currently active Virtual Console.
- 1-9. /dev/tty[1-9]: Specific virtual consoles.
- 10-63. /dev/ttyV[10-63]: More virtual consoles that nobody uses.
- 64-127. /dev/tty[0-?][0-63]: Dial-in serial ([controller][port]).
- 128-191. /dev/pty[p-s][0-f]: PTY Masters.
- 192-255. /dev/tty[p-s][0-f]: PTY Slaves. ([0-f]=0123456789abcdef)
-
- Notes: NOTICE THE NEW NAMING FOR SERIAL LINES. Serial lines will
- be named either "tty..." or "cua..." (See Major #5) followed
- by the one-digit number of the *board* the line is from, and
- the number of the line on that board. The four default lines
- are considered to be on board "0", so what DOS calls "COM2:"
- should now be known as "/dev/tty01" or "/dev/cua01".
-
- For more information on the use of multi-port boards, read
- the documentation which accompanies the serial patches.
-
- 5. Dial-out ...... (character) .. tty cua*
- 0. /dev/tty: the tty that owns the process calling it.
- 64-127. /dev/cua[0-?][0-63]: Dial-out serial ([controller][port]).
- (See Major #4 for NEW NAMING CONVENTION.)
-
- 6. Parallel ...... (character) .. par[0-2] lp[0-2]
- Parallel (printer) ports. (Increasable in include/linux/lp.h)
- 0. /dev/par0 (/dev/lp0): First XT parallel port
- 1. /dev/par1 (/dev/lp1): First AT parallel port
- 2. /dev/par2 (/dev/lp2): Second AT parallel port
-
- Notes: The number of line printers is defined by LP_NO which is
- found in [/usr/src]/linux/include/lp.h.
-
- 7. Unused. (First come, first serve.)
- This one's getting old. No minor numbers are yet assigned.
- It's not even in the source code. Maybe it never will be...
-
- 8. SCSI-Disk ..... (block) ...... sd[a-h]<[0-8]>
- Minors numbers are ((16 * Drive) + Partition)
- where
- Drive is the number of the physical drive in order of detection
- and
- Partition is as follows:
- 0 is the whole drive
- 1-4 are the DOS "primary" partitions
- 5-15 are the DOS "extended" (or "logical") partitions, so...
-
- 0. /dev/sda (/dev/sda0): The first (detected) SCSI drive.
- 1-4. /dev/sda[1-4]: Primary partitions on the first SCSI drive.
- 5-15. /dev/sda[5-15]: Extended partitions on the first SCSI drive.
- 16. /dev/sdb (/dev/sdb0): The second (detected) SCSI drive.
- 17-20. /dev/sdb[1-4]: Primary partitions on the second drive.
- 21-31. /dev/sdb[5-15]: Extended partitions on the second drive.
- 32. /dev/sdc (/dev/sdc0): The third (detected) SCSI drive.
- ...and so on.
-
- 9. SCSI-Tape ..... (character) .. <n>st[0-1] or <n>rmt[0-1]
- 0. /dev/st0: First (detected) SCSI tape drive, rewind-on-close.
- 1. /dev/st1: Second (detected) SCSI tape drive, rewind-on-close.
- 128. /dev/nst0: First (detected) SCSI tape, *no* rewind-on-close.
- 129. /dev/nst1: Second (detected) SCSI tape, *no* rewind-on-close.
-
- 10. Mouse ......... (character) .. logibm psaux inportbm atibm (mouse)
- (MGR may require that /dev/mouse be linked to one of these...)
- NOTE THE CHANGES TO DIFFERENTIATE MOUSE TYPES!
- (Please implement these in the distributions.)
- 0. /dev/logibm: Logitec-'compatible' bus mouse
- 1. /dev/psaux: PS/2 mouse port (may not work on some lap-tops, yet)
- 2. /dev/inportbm: MicroSoft "InPort" bus mouse
- 3. /dev/atibm: ATI XL bus mouse
-
- 11. CD-ROM ........ (block) ...... scd[0-1]
- 0. /dev/scd0: The first (detected) SCSI CD-ROM.
- 1. /dev/scd1: The second (detected) SCSI CD-ROM.
- ("There's not much more to it than that" says Eric Youngdale.)
-
- 12. QIC-tape? ..... (character) .. rmt{8,16} tape<{-d,-reset}>
- (I really don't have much info on this one... )
- 6. /dev/rmt8: QIC-120
- 8. /dev/rmt16 (/dev/tape): QIC-150
- 136. /dev/tape-d: (It has something to do with being 128+8... ?)
- 255. /dev/tape-reset: For resetting only.
-
- 13. XT-disk ....... (block) ...... xd[a-b]<[0-8]>
- XT (8-bit) hard disk controller devices.
- Minor numbers are assigned in the same manner as for the
- normal (AT-type) Hard Drive devices ("/dev/hd*").
-
- 14. Audio ......... (character) .. audio dsp midi mixer sequencer
- 0. /dev/mixer: Mixer and Control Device
- 1. /dev/sequencer: FM-synthesizer and Midi
- 2. /dev/midi: (for future use)
- 3. /dev/dsp: Digitized voice (DAC/ADC)
- 4. /dev/audio: (Reserved for compatibility with Sun)
-
- 15. Joystick ...... (character) .. js[0-1]
- 0. /dev/js0: (Left/Right?) joystick.
- 1. /dev/js1: (Right/Left?) joystick.
-
- 16. Socket ........ (character) .. net arp
- 0. /dev/net: Generic layer (sockets)
- 1. /dev/arp: Address Resolution Protocol (ARP)
-
- 17. AF_UNIX ....... (character) .. unix
- 0. /dev/unix: AF_UNIX protocol layer
-
- 18. AF_INET ....... (character) .. inet ip icmp tcp udp
- 0. /dev/inet: AF_INET protocol layer
- 1. /dev/ip: Inernet Protocol (IP)
- 2. /dev/icmp: Internet Control Message Protocol (ICMP)
- 3. /dev/tcp: Transmission Control Protocol (TCP)
- 4. /dev/udp: User Datagram Protocol (UDP)
-
- 19. WE-driver ..... (character) .. we[0-3]
- 0-3. /dev/we[0-3]: "WE" driver
-
- 20. DP8390-driver . (character) .. wd[0-3] ec[0-3] ne[0-3]
- 0-3. /dev/wd[0-3]: "DP8390" driver, WD8003
- 8-11. /dev/ec[0-3]: "DP8390" driver, 3C503
- 16-19. /dev/ne[0-3]: "DP8390" driver, NE2000
-
- 21. Sony-CD-ROM ... (block) ...... sonycd
- 0. /dev/sonycd: Sony CDU-535 CD-ROM, I think.
-
- 22. 2nd AT-Cntrlr . (block) ...... hd1[a-b]<[0-8]>
- Minor numbers are like those of the primary AT-Disk controller.
- THIS MAY WORK FOR HARD-CARDS.
- (Note the "1" in the device name for the secondary controller.
- This is because we may eventually wish to change the names of
- the primary-controller drives to "hd0[a-b]...".)
-
- 23. Mitsumi CD-ROM (block) ...... mcd
- I don't know much about this one.
-
- 31. Link Interface (character?) . ???
- 0. ???
- Link Interface for use with Christoph Niemann's driver for the
- INMOS C012-based high-speed serial link interface card (useful
- for talking to transputers or video digitizers).
-
-
- VI.06) (Chuck Boyer) Could some one clear up the devices meaning?
-
- ANSWER: (Jim Winstead Jr)
- >port
-
- This allows programs to access the hardware ports directly. Not
- something you generally mess around with much.
-
- >ptyp0-3
- >ptypa...tty
-
- These are the pseudo-tty 'master' devices. Each pty connection uses
- a slave-master set of tty devices.
-
- >tty0...
-
- tty[1-8] are the virtual consoles associated with Alt-F[1-8]. tty0 is
- the current virtual console (so writing something to tty0 goes to the
- current vc).
-
- >tty64 I've figured out is the modem connection
-
- Yes, that would correspond to COM1 under DOS. However, the tty64 name
- is obsolete - ttys[1-4] should be used instead.
-
- >ttyp0...
- >ttypa...
-
- These are the pseudo-tty 'slave' devices.
-
- >ttys1...
-
- These are the serial devices. ttys1 corresponds to COM1 under DOS,
- ttys2 corresponds to COM2, etc.
-
-
-
- VI.C Special Serial
- ~~~~~~~~~~~~~~~~~~~
- *** This section is maintained by Jim Gifford
- *** (jgifford@attmail,world.std}.com), some addenda were sent by
- *** Juha Ursin (jus@snakemail.hut.fi)
- *** Last update May 1993.
-
- Douglas E. Quale:
- This has come up a couple of times already (including the case of
- serial mice as well), but for the record stty acts on stdin not
- stdout. Old stty's (from V7 through BSD4.3) used stdout, but this is
- suboptimal and doesn't conform to POSIX. The GNU stty you are likely
- using on Linux uses stdin, as does the stty distributed with BSD
- Networking Release 2. (Also, ``stty -a'' is more informative about
- possible parameters, although it's pretty hard for me to remember what
- 90% of that stuff does without refering to the man page.)
- Jim Gifford:
- However, there are a few older (of mysterious origin) stty's that work
- on stdout(I have one myself!)
-
- VI.07) Is there a list somewhere where I can get help with serial
- communications under Linux?
-
- ANSWER: (Jim Gifford -- jgifford@world.std.com)
- There is a list for the discussion of serial communications under
- Linux. It is for problems, drivers, new developments, etc... with
- the Linux serial devices. The list is: linux-serial@stolaf.edu
- To join, send mail to linux-serial-request@stolaf.edu
- I hope that this list will prove beneficial to the improvement of
- Linux. This list is maintained by Michael K. Johnson as
- linux-serial-request@stolaf.edu
-
- VI.08) When I run kermit under Linux, I get "Warning, Read access
- to lock directory denied". What am I doing wrong?
-
- ANSWER: Nothing, you just need to create /usr/spool/uucp (kermit 4.6?)
- or /usr/spool/locks (this is for the kermit5A), which is where kermit
- like to lock files.
-
- VI.09) What are the major, minor numbers for the serial ports under linux?
-
- ANSWER: Major 4, Minor :
- 64 /dev/ttys0 - com1
- 65 /dev/ttys1 - com2
- 66 /dev/ttys2 - com3
- 67 /dev/ttys3 - com4
-
- VI.10) can anyone give me a sample /etc/inittab entry for login
- from a pc attached to serial line /dev/ttys2?
-
- ANSWER: "Humberto speaking :), updated by Rick Miller"
- First set up the modem to turn off echo and enable auto answer, I do
- this in kermit by connecting to the modem and typing "ate0s0=1"
- followed by enter (w/o quotes). Then setup inittab to spawn getty on
- the modem
- ttys2:vt100:/etc/getty -m 1200 ttys2
- (Replace "vt100" with the name of the /etc/termcap entry for the
- terminal type you will use, or use "dumb" if you don't have one.)
-
- Then it should work. Some modems can be permanently set to disable
- echo and set auto answer, see your manual.
-
- Jim Weigand says:
- disable all messages. This will prevent getty from hanging up
- your modem.
- Set For:
- ATE0 No echo
- ATQ1 No messages
- ATS0=2 Answer 2nd ring
- ATS7=60 1 minute to answer (shorter if 2400 baud)
- You can use kermit to set these. Do an AT&W to save for power-up.
-
- Michael K. Johnson says:
- If you would rather not save these commands as defaults to come up
- on power-up, perhaps because you want to use your current modem
- settings under a DOS communications package, you can also shove
- these command out ttys? from /etc/rc (or /etc/rc.local) using
- the command:
- echo "<modem_settings>" > /dev/ttys?
-
- VI.11) How do I set parameters like parity for serial login?
-
- ANSWER: Use stty and redirect input from the serial line.
- ex: stty parodd < /dev/ttys2 which gives ttys2 odd parity.
- type stty -a to get an idea of possible parameters.
- Or 'man stty' as well :)
-
- VI.12) (Juha Ursin) I run SLS pl6, kernel is pl8 and I use
- libc.4.3.2.
- Trying to allow login on my terminal (on ttyS1 with only three wires
- (RX, TX, GND) connected). Getty 9600 /dev/ttyS1 starts and I get the
- login prompt, but the password prompt newer appears.
-
-
- ANSWER: (Ted Ts'o)
- Setting CLOCAL is the correct way to solve this --- it is not a bug in
- the kernel. Since you only have three wires connected, it means that
- the carrier detect line was left floating, and probably floated to
- ground. Thus, the /dev/ttyS1 device blocked waiting for carrier detect
- to go high. The reason why the login prompt appeared is that getty
- opened /dev/ttyS1 with the NODELAY flag; but when /dev/ttyS1 was
- reopened for /bin/login, it did not have the NODELAY flag, and you ended
- up blocking.
-
- That's what the CLOCAL flag is for --- it indicates that the serial port
- is hooked up to a local (hence CLOCAL) terminal, and so the carrier
- detect line should be ignored. In general, whenever the carrier detect
- line is not supported by a serial device, or if your RS-232 cable does
- not support the CD wire, the CLOCAL flag should be set.
-
-
- VI.13) (Juha) Where are my Call-out-mode -serial ports (cuaX) ?,
- When should I use these cuaX ports ?, Why on my system ttys3 is used
- instead of ttyS3 ?
-
- ANSWER: (Ted) Ask the person who created the install procedure (Peter
- MacDonald, in the case of SLS).
-
- >When should I use these cuaX ports?
-
- When you're dialing out (i.e., kermit, cu, seyon, uucp, etc.).
-
- >On my configuration ttyS3 is named ttys3 incorrectly - why?
-
- Again, see the person who created the install procedure. Recent
- versions of SLS create the serial devices using the new convention
- (ttyS3). ttys3 represents an older convention, and some older install
- procedures may not have switched over.
-
- VI.14) (Juhan) What other possibly free IRQ's there are than IRQ5 ?,
- Can I use IRQ7 when not printing ?,
-
- ANSWER: (Ted)
- IRQ 2 is also often free, although some networking cares use them.
-
- > Can I use IRQ 7 when not printing?
-
- It's generally a bad idea to have two cards plugged in sharing an IRQ
- address. It happens to work with most serial cards, but it doesn't
- alwas work. You can use IRQ 7 if you don't have a parallel port plugged
- into your system. If you do have a parallel port plugged in, you can
- try using IRQ 7; it might work, it might not. Be sure to also make sure
- that the printer works after you plug in your serial card configured to
- use IRQ 7. Another alternative: If you are using the version of the
- parallel printer driver that doesn't use interrupts, you can go to your
- parallel port board, and disable the IRQ, thus freeing IRQ 7.
-
- Is pin 1 nearest to the plate or is it 31?
-
- If this is a sample PC ISA card, then A1 is the pin closest the "back" of
- the card, and on the top, if the pins are held down and the "back" of
- the card is to your right:
-
- ----------------------------------------------------------------------
- | |
- | |
- | |
- | |
- | |
- | |
- +---------------------------------+ +---+ +---+
- | | | |
- +----------+ +---------------+
- A A
- 3 1
- 1
-
- The "B1..B31" pins are on the reverse side of the card.
-
-
-
-
- VII. MORE HINTS
- ===============
-
- This part try to keep track of the different information
- that appeared in comp.os.linux and on the list since beginning of
- March. I tried to update it for KERNEL_VERSION, so there might be some
- mistakes. Moreover take care to use the correct library and include
- stuff, and the ad-hoc gcc you use !!!
-
-
- VII.01) How can I backup my Hd under Linux ?
-
- ANSWER: I know at least two ways. One possibility is tar and mtools,
- another possibility is the diskbackup/diskrestore of Diamano Bolla
- (digest37 vol. #2) which saves big hd to floppies using the
- stdin/stdout. These utilities have been uploaded to the major sites in
- file disksplit.tar.Z.
- An example usage (Roger Binns) is:
-
- tar cvf - bin dev usr etc .. | compress | diskbackup
-
- and to restore:
-
- diskrestore | uncompress | tar xvf -
-
- BTW: if you are on Ethernet you could send your files via tar..|rsh (tar...)
- or even via NFS to a host which is regularly backed up !
-
-
- VII.02) Where is 'which' ?
-
- ANSWER: It depends on the sh you are running:
- in bash 'type -path'
- in tcsh it's a builtin
-
- for rc you can try the following (untested by me) script from
- Kevin Brown:
-
- #!/bin/sh
- for i in `echo $PATH | sed 's/:/ /g'` ; do
- for j in ""$@" ; do
- if test -x "$i/$j" ; then
- echo "$i/$j"
- fi
- done
- done
-
- VII.03) How to use setterm: for the novice?
-
- ANSWER:The setterm utility provides access to most of Virtual Consoles
- (VCs) functionality. You can set your screen up to blank at 10
- minutes using:
- setterm -blank 10
-
- You can set colors, and clear the screen. For a full list of commands,
- just type "setterm" with no arguments.
-
- There are a few tricks with the screen dumper can really make VCs go a
- long way. Here are a few of the common ones that I use:
-
- setterm dump
-
- Dumps the contents of the current VC to screen.dump (in the current dir).
-
- setterm dump 4
-
- Dumps the contents of VC 4 to screen.dump
-
- setterm -file mydumpfile -dump 4
-
- Dump the contents of VC 4 to the file mydumpfile
-
- setterm -file /dev/tty0 -dump 4
-
- Dumps the contents of VC 4 to the current VC.
-
- setterm -file /dev/tty4 -dump
-
- Dumps the contents of the current VC to VC 4.
-
- setterm -file /dev/ttys1 -dump
-
- Dumps the contents of the current VC to the serial port.
- Handy if you are logged on and want to paste a screen full without
- having to resort to doing a file transfer.
-
- setterm -file mydumpfile -append 4
-
- Appends to instead of overwriting the dump file. Useful if you
- have several screens you wish to concatenate.
-
-
- VII.04) I've tried clear/reset which exist on most of unix but it
- doesn't work, have I missed something?
-
- ANSWER: setterm -clear or setterm -reset will solve your missing. For
- clear, you can also write a small script (which use the cl: part of
- /etc/termcap wrt your TERM), or use bash where ctrl-l will do it for
- you.
-
-
- VII.05) I know there are VC, but where is the setterm stuff?
-
- ANSWER: It's in the current distribution (i.e. on the images), the
- source can be found in virtcons.tar.Z at nic.
-
-
- VII.06) I know there are shared libraries; does there exist an easy
- way to check an executable for sharing ?
-
- ANSWER: (Claude Morin:) There exists at tsx-11 ldd.tar.Z If you follow
- the instructions, you will be able to type "ldd <executable>" to List
- the Dynamic Dependencies of the executables. In other words 'ldd'
- prints the name of the shared libraries needed by the executable,
- nothing appears for static one.
-
- ANSWER: (Josh Yelon & HJ Lu) - very old binaries.
- (J.Y.) An executable which shares a library is linked with an
- (ordinary, non-shared) "stub" version of the library. One of the first
- thing this stub does (when the executable is run) is to ask the kernel
- to load the (big) "shared version" of the library (which is usually
- named /lib/lib.XX.XX) The upshot of this is that in the code for the
- stub (part of the executable), is the string "/lib/lib.XX.XX"; which
- can be searched by using 'strings' or 'grep'.
- (HJ. L.) if you have gcc2.11a or later the shared image is changed to
- /lib/libxxxx_vyy_zzz. And you should better use nm to find
- "__shared_lib" (nm failed on stripped executable). You can also write
- a function for "file", which can even check the version number ....
-
- VII.07) What is the rdev program provided in the images?
-
- ANSWER: It's a program from Werner Almesberger of ETH. With no
- argument it prints the first line of /etc/mtab. With one argument, a
- boot-image, it prints the device configured as the root device, and
- with two arguments, a boot image and a device, it sets the device as
- default root in the specified image.
-
-
- VII.08) How to start Linux from drive B?
-
- ANSWER: There is a DOS utility called boot_b.exe (look at DOS ftp).
- Another simple way is to open the box and invert the cables.
-
-
- VII.09) The program boot_b works fine /but/ once the first disk is
- read the system go back to the first drive, any hints?
-
- ANSWER: Yes, change the bootimage in just the same way that you change
- it to boot on the hard drive, execept that the major/minor pair is
- different. All these information are in the file INSTALL-0.10.
- Remember that if you use a sun or other endian machine, you will need
- to reverse the byte order when you run the filter program (also in the
- same file).
-
-
- VII.10) How can I get Linux to boot directly from the harddisk?
-
- ANSWER: (Rick) The best option right now is LILO version ALPHA.8. It
- has been generally agreed that the days of using "shoelace" are at an
- end. See Section III of this FAQ for LILO information.
-
- VII.11) I use shoelace, but I want to change my root partition, what
- is the process to get rid of it?
-
- ANSWER: With Norton utility you can put back a standard boot sector.
- Another possibility is to restore the old boot sector (the one you
- should have backup *before* installing shoelace).
-
-
- VII.12) Sometimes, when I want to remove a directory, I get an error
- message, is it a (known) bug?
-
- ANSWER: No, There is no bug at all, you probaly have another shell
- on another VC whose working directory is either the one you try to
- remove, either a subdirectory of it.
-
-
- VII.13) I'm looking for init, getty, login, passwd stuff, where
- can I find them?
-
- ANSWER: You should find it in shadow.tar.Z (only sources), at least
- at tsx in the usr.bin directory. Many people have reported some troubles
- with the *OLD* shadow-passwd (shadow-bin.tar.Z and shadow-src.tar.Z, so
- do not use them anymore); an alternative might be the mcc-interim
- which contains standard passwd binary. There is also the Peter Orbaek's
- admutil-1.?.tar.Z and poeigl-1.?.tar.Z which contains source for
- shutdown, su, chsh, passwd and a system V init compatible.
-
-
- VII.14) How can I setup a user account other than root ?
-
- ANSWER: You can either use the adduser program, either do it manually.
- In the later case, you have to:
- a) edit /etc/passwd as root and add a line of the following format:
- user:passwd:uid:gid:user name:home directory:login shell
-
- user is the login name; uid is the numeric user id, it should be
- unique; gid is the numeric group id, this number should correspond to
- an entry in /etc/group. The passwd field should be left blank 'cause
- it is stored in an encrypted form [to set this field just use the
- passwd program].
- example
- faq::200:5:Marc-Michel:/home/faq:/bin/sh
- b) Still as root, you shoud now create the home directory and set the
- correct ownership.
- mkdir /home/faq
- chown faq /home/faq
- chgrp 5 /home/faq
-
-
- VII.15) I've been trying to get Linux to run on my [3/4]86 box. It
- can't even boot. Any suggestions?
-
- ANSWER: The most common error/problem is writing the bootimage to a
- low density disk. It fits, but the bootstrap code will only recognize
- high density disk. So try to format explicitely disk as high density:
- - for 3.5", 'format a: /n:18 /t:80 '
- - for 5.25", 'format a: /n:15 /t:80 '
-
-
- VII.16) Does there exist games, languages (other than C), and
- anything which make the system more friendly?
-
- ANSWER: Yes, among other things there are rogue and yahtzee; TeX;
- Prolog, Perl.. but in general, if you want some extra tool port it to
- Linux this is also a good beta-testing exercice.
-
-
- VII.17) Whenever I use uemacs 3.1X on a symlink, the symlink does
- not exist anymore, why?
-
- ANSWER: (Tristram Mabbs) Since ue3.10, uemacs uses 'safe save' mode,
- writing the file to a temporary and moving it OVER the original. In
- the process, this deletes the original. To prevent this just add the
- following in your emacs '.rc' file: set $ssave FALSE
-
-
- VII.18) I have an SVGA, but Linux detect an EGAc/EGAm; is it normal?
-
- ANSWER: (Jim Winstead) This is correct actually. You have an EGA+ card
- (SVGA) with a Color/Mono monitor. The only four possibilties are EGAc,
- EGAm, *MDA and *CGA (according to the code in
- kernel/chr_drv/console.c).
- The true test, if Linux detects your video card, is if you press
- <RETURN> at the "Press <RETURN> to see SVGA- ..." boot-time message.
- If you have a SVGA recognized card, it will ask you to choose a
- screen size. If not detected, the default is 80x50 mode.
- BTW if you have no SVGA, press the <space> and you are in 80x25 mode.
-
- If you have dowloaded the kernel, you can automatically skip this
- query at boot-time if you set the SVGA_MODE variable in the main
- Makefile before compiling a new bootimage.
-
-
- VII.19) How can I change the keyboard repeat rate?
-
- ANSWER: (Michael K Johnson) In boot/setup.S there are the lines:
- ! set the keyboard repeat rate to max
- mov ax,#0x0305
- mov bx,0x0000
- int 0x16
-
- If you don't want to change the repeat rate at all, just comment out
- these lines. If you want something in the middle, change the
- mov bx,0x000
- by mov bx,0x??yy
- where ??yy is determined by (Ralf Brown's interrupt list)
- bh= delay value (0x00 = 250ms to 0x03= 1000ms (one sec))
- this is the delay before the repeat is performed
- bl= repeat rate (0x00 =30/sec to 0x1f=2/sec; 0x0c=10/sec [default])
-
-
- VII.20) I compiled fdformat.c and ran it on 1.44Mb and 1.2Mb, the
- results are unreadable, any clue?
-
- ANSWER: (M. Pereckas) fdformat only low-level formats the disk. to use
- the fdformatted disk with DOS filesystem, run mformat on the disk.
- Mformat writes DOS filesystem information but is unable to low-format
- :). In order to put a Linux filesystem on a (low)formatted disk you
- have to mkfs it.
-
- VII.21) Is it possible to disable the 3-fingers salute
- (ctrl-alt-del) ?
-
- ANSWER: Yes, in kernel/sys.c you can read the following:
-
- /*
- * this indicates wether you can reboot with ctrl-alt-del: the deault is yes
- */
- static int C_A_D = 1;
-
- there is also a small utility written by Linus in digest242 vol#2
-
-
- VII.22) Could some one explain the information provided at boot-time?
-
- ANSWER: (Jim Winstead Jr)
- > serial port at 0x03f8 is a 16450
- > serial port at 0x02f8 is a 16450 (what's that the uart chip?)
-
- Right, the last number should either be 8250, 16450, 16550, or 16550a,
- and on the two 16550 models, it will report that FIFO's have been
- disable (16550) or enabled (16550a).
-
- > 8 virtual consoles (that's how many alt-F's I can get going?
- > but only F1-4 actually work)
-
- You can get sessions running on Alt-F[1-8], but the 'standard'
- /etc/inittab only runs getty/login on Alt-F[1-4]. You can start
- sessions on the other consoles by using 'doshell' or adding lines to
- /etc/inittab.
-
- > 4 pty's (are these the consoles F1-4?)
-
- No, those are 'pseudo' ttys, which programs like MGR use to simulate
- tty connections. That's probably a gross over-simplification, but it
- gives you the general idea, I think. :)
-
- > p_init: lp1 exists (0) (is that the (l)ine (p)rinter?)
-
- Right.
-
-
- VII.23) What is the meaning of files ended by .T.Z (or .taz) ?
-
- ANSWER: The suffix Z is for compressed files (to uncompress them use
- the command `uncompress file.Z`).
- The suffix T indicates a "tar file" the usual suffix is tar but, the
- 14 chars filename limit of the Minix filesystem makes it cumbersome to
- use .tar.Z (to untar a file ended by .T, use the command
- `tar options file.T` (see the man page for more details).
-
- For the .taz file, change them as .T.Z and go-ahead.
-
- VII.24) What is the meaning of files ended by .T.z (or .tpz) ?
-
- ANSWER: The suffix z is for files compressed with the
- gzip utility, which is being used more frequently because it provides
- better compression. These can be uncompressed with the `gzip -d
- file.z` command.
-
-
- VII.25) I have upgraded the kernel from XX to YY (XX > YY), however the
- login screen still says YY.
-
- ANSWER: Just change the message in one of these files: /etc/issue and
- /etc/motd. The former contains the message before the login, the later
- is the one after you are logged in.
-
- VII.26) What is doshell good for ?
-
- ANSWER: It's an old program provided in the early Linux version (0.12)
- when the getty was not already there, it spawns a shell on any tty's.
- (Mattew Gream): I do this quite often ( getty on tty1, 2, 3 and my
- rc.local spawns a shell on tty4 as follows
- '/usr/bin/doshell /dev/tty4 /bin/tcsh &'
-
-
- VII.27) I don't have the kernel sources, how can I change the keyboard
- language?
-
- ANSWER: You can use the fixkbd program written by Laurent JULLIARD
- (Laurent_JULLIARD@grenoble.hp.com). Its purpose is to fix the keyboard
- map used in your kernel image. It works more or less a la "rootdev"
- (or rdev). It can be found on tsx-11.mit.edu in
- /pub/linux/binaries/sbin/fixkbd.tar.Z.
-
-
- VII.28) Does there exist a possibility to track down the source of
- kernel pannic messages ?
-
- ANSWER: Here's info from Linus on how to track down the source
- of kernel panic messages. The values for EIP, address, and so on are
- JUST EXAMPLES: the EIP, EFLAGS, etc. can be anything.
-
- The lines after ">" were written by me; the responses by Linus.
-
- > Unable to handle kernel paging request at address C000000A
-
- This means something in the kernel tried to access kernel memory at
- address 0x00A (the C0000000 offset is due to the kernel starting at
- virtual address 0xC0000000). The first page of kernel address space is
- unmapped to find these kinds of incorrect references (it's probably a
- NULL dereference to a structure member at offset 0xA).
-
- > Oops: 0002
-
- Error code. This tells you if it's a read or write (forget which ritgh
- now, and don't have any books handy)
-
- > EIP: 0008:000290D2
-
- This is where it happened: segment 0008 (kernel code segment) and offset
- 0x290D2 into the kernel. So to find this, you generally do something
- like
-
- nm /usr/src/linux/tools/system | sort | less
-
- and search for the function that contains the address 0x290D2.
-
- > EFLAGS: 00010087
- > fs: 0017
-
- Eflags and fs when the exception happened. You usually don't need this.
-
- > base: C0000000, limit: 000A0000
- > Pid: 0, process nr: 0
-
- In what process the exception happened. This is the swapper, which also
- means the thing is fatal (other processes you can just kill). That it's
- in the swapper process probably means that it's an interrupt that did
- it, as the swapper doesn't really do anything.
-
- > 89 50 04 c7 03 00 00 00 00 c7
-
- This is the instruction that resulted in the error. I usually
- disassemble them by hand and see what it is, then I try to find out
- exactly where in the function this assembly sequence comes up (probably
- by compiling the .c file to a .s file and looking around).
- Alternatively you can just run 'gdb' on /usr/src/linux/tools/system, but
- gdb has some problems.
-
- > task[0] (swapper) killed: unable to recover
- > kernel panic: Trying to free up swapper memory space
- > In swapper task - not syncing
-
- This is just to tell you not to expect anything from the kernel any
- more: linux cannot go on without the swapper task.
-
- > How can I decode the numbers in the message?
- > Also, note that sometimes the "Unable to handle..."
- > message is followed by the "Oops: 0002" block, but
- > the last message is sometimes something else (i.e. not
- > always a "task[0] (swapper)...." message, but something
- > from the TCP driver in this case.
-
- It depends on where it happened. If it's an interrupt, it can
- essentially happen in any task (all interrupts are handled in the task
- that happens to be currently active), while "normal" code happens in the
- task that calls it.
-
-
- ===================8<==========>8================
-
- --
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- # LaBRI | #
- # 351 cours de la Liberation | e-mail: corsini@geocub.greco-prog.fr #
- # 33405 Talence Cedex | e-mail: corsini@labri.u-bordeaux.fr #
- # | #
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- --
- There will be a sig when our local net is reliable.
- For now, I would rather stay anonymous.
-